<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    var p = prompt("请输入月份");

    if (p<=12 && p>=1){
        if (p <= 10 && p>=5){
            var c = prompt("头等舱还是经济舱");
            if (c == "头等舱"){
                alert("价格2000");
            }else {
                alert("价格800");
            }
        }else{
            var c1 = prompt("头等舱还是经济舱");
            if (c1 == "头等舱"){
                alert("价格800");
            }else {
                alert("价格200");
            }
        }
    }
</script>

</body>
</html>